=begin
1. ruby 解释型语言
2. 每条代码都默认带返回值
3. 纯面向对象的语言
4. 强类型、动态类型语言，类型检查是在运行时检查
5. 鸭子类型
=end


# 打印字符串
puts "Hello, world."

# 输出下标值
name = "Hello, ruby."
puts name.index("ruby.")

# 循环打印
i = 0
while i < 10
  puts "黄小宝"
  i = i + 1
end

# 循环打印
j = 1
while j <= 10
  puts "This is sentence number #{j.to_s}."
  j = j + 1
end
